package com.meteor.user.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.meteor.framework.mybatis.dao.BaseDao;
import com.meteor.user.entity.SysParams;
import org.apache.ibatis.annotations.Mapper;

/**
 * 参数管理
 *
 * @author lynn
 * @date 2024/1/03
 */
@Mapper
public interface SysParamsMapper extends BaseDao<SysParams> {

    default boolean isExist(String paramKey) {
        return this.exists(new QueryWrapper<SysParams>().eq("param_key", paramKey));
    }

    default SysParams get(String paramKey) {
        return this.selectOne(new QueryWrapper<SysParams>().eq("param_key", paramKey));
    }
}